home *** CD-ROM | disk | FTP | other *** search
- <comment> Creates a new flash movie. </comment>
-
- <title>New Animated Icon</title>
-
- <script language="EasyScript">
-
- registry = "New\\Icon";
-
- /////////////////
- function OnLoad ()
- {
- movie = new Movie;
- movie.setDefaultName ();
-
- radio_size = getRegistryValue (registry, "radio_size", 2);
- color_depth = getRegistryValue (registry, "color_depth", 3);
- user_width = getRegistryValue (registry, "user_width", 100);
- user_height = getRegistryValue (registry, "user_height", 100);
- }
- /////////////////////
- function CreateIcon ()
- {
- setRegistryValue (registry, "radio_size", radio_size);
- setRegistryValue (registry, "color_depth", color_depth);
- setRegistryValue (registry, "user_width", user_width);
- setRegistryValue (registry, "user_height", user_height);
-
- width = 320;
- height = 240;
- switch (radio_size){
- case 1:
- width = 20;
- height = 20;
- break;
- case 2:
- width = 32;
- height = 32;
- break;
- case 3:
- width = 48;
- height = 48;
- break;
- case 4:
- width = 64;
- height = 64;
- break;
- case 5:
- width = user_width;
- height = user_height;
- break;}
-
- movie.width = width;
- movie.height = height;
- movie.depth = color_depth;
- movie.export_width = width;
- movie.export_height = height;
-
- movie.zoom_mode = "in";
- movie.zoom_factor = floor (64 / width) * 4 + 2;
-
- new_frame = movie.frames.addNewFrame();
- new_frame.name = "Key frame " + (movie.frames.count());
-
- if (movie.create ()){
- movie.resetCenter ();
- movie.saved();
-
- window.returnValue (movie);
- window.close ();}
- }
-
- </script>
-
- <body bgcolor="normal" text="#000000" OnLoad="OnLoad()" OnEnter="CreateIcon()" translate>
- <div valign=middle>
-
- <table width="100%" cellspacing=4 cellpadding=0 bgcolor="light" borderstyle="raised">
- <tr><td valign=top><img src="images/large_flash.bitmap"><spacer>
- <td><table>
- <tr><td>
- <font size=5>Animated Icon</font>
- <td><input type="text" size=16 name="movie.name"><spacer>
- </table></table>
-
- <spacer height=4>
-
- <table width=100% cellspacing=4 cellpadding=0 bgcolor="light" borderstyle="raised">
- <tr><td>
- <table cellspacing=4 cellpadding=4 width=100%>
- <td width=exact valign=top>
- <table cellspacing=0 cellpadding=2>
- <tr><td><input type="radio" name="radio_size" value="1"><a onclick="radio_size=1">20 x 20</a>
- <tr><td><input type="radio" name="radio_size" value="2"><a onclick="radio_size=2">32 x 32</a>
- <tr><td><input type="radio" name="radio_size" value="3"><a onclick="radio_size=3">48 x 48</a>
- <tr><td><input type="radio" name="radio_size" value="4"><a onclick="radio_size=4">64 x 64</a>
- <tr><td><input type="radio" name="radio_size" value="5"><a onclick="radio_size=5">Other</a>
- <input type="text" name="user_width" size=4>x
- <input type="text" name="user_height" size=4>
- </table>
- </table>
- </table>
-
- <spacer height=8>
-
- <table cellspacing=0 cellpadding=0 width="100%">
- <tr><td align=right>
- <a button onMouseUp="CreateIcon()" width=+10 height=+2><img src="images/small_flash.bitmap" hspace=4>Create animated icon</a>
- <a button onMouseUp="window.close()" width=+20 height=+2><img src="images/small_cancel.bitmap" hspace=4>Cancel</a>
- </table>
-
- <spacer height=4>
-